package com.thunisoft.beanutils.service.impl;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

import com.thunisoft.beanutils.bean.Father;
import com.thunisoft.beanutils.bean.Son;
import com.thunisoft.beanutils.service.CopyProperties;

/**
 * @title ApacheBeanUtils.java
 * @package com.thunisoft.beanutils.service.impl
 * @projectName spring.boot
 * @author yzj 
 * @date 2019年6月12日 下午2:59:47
 */
public class ApacheBeanUtils implements CopyProperties {

	@Override
	public void copy(Son from, Father dest) {
		try {
			BeanUtils.copyProperties(dest, from);
		} catch (IllegalAccessException | InvocationTargetException e) {
			
			e.printStackTrace();
		}
	}

}
